<template>
    <div>
            <h1>
                组件A,{{ count.num }}
            </h1>
            <div v-for="item in star.list" :key="item.id">
      姓名:{{item.name}} 年龄:{{item.age}}
    </div>
            <n-button type="info" size="medium" @click="handleStarPost">
      录入明星
    </n-button>
    <div v-for="item in goods.goodsList" :key="item.id">
      商品名称:{{item.name}} 商品价格:{{item.price}}
    </div>
    </div>
</template>

<script setup>
import {useCount} from '../../store/count'
import { useStar } from '../../store/star';
import {useGood} from '../../store/good'
const count= useCount()
const  handlePlus =()=>{
    count.num++
}
const star = useStar()
const handleStarPost = ()=>{
  star.starPost({name:'坤哥11',age:180})
}
const goods = useGood()
</script>

<style lang="scss" scoped>

</style>